#include <iostream>
#include <string>
#include "assert.h"
#include "split_string.h"
#include "split_string_test.h"
using std::string;
using std::cout;
using std::endl;

void SplitStringTest::testSplitNormal()
{
	string testWord="I love software project!";
	string oriSplitWord[]={"I","love","software","project!"};
	vector<string> vt=split(testWord,' ');
	for(int i=0;i<vt.size();i++)
	{
		assertEqual(vt[i], oriSplitWord[i]);
	}
	cout << "testSplitNormal() OK!" << endl;
}

void SplitStringTest::testSplitBlank()
{
	string testWord="";
	vector<string> oriSplitWord;
	vector<string> vt=split(testWord,',');
	assertEqual(vt, oriSplitWord);
	cout << "testSplitBlank() OK!" << endl;
}
